// routes/goods.js
const Router = require('koa-router');
const auth = require('../middleware/auth');
const goodsController = require('../controllers/goodsController');

const router = new Router({ prefix: '/goods' });

router.post('/', auth, goodsController.createGoods);
router.get('/', auth, goodsController.getGoodsList);
router.get('/:id', auth, goodsController.getGoodsById);
router.put('/:id', auth, goodsController.updateGoods);
router.delete('/:id', auth, goodsController.deleteGoods);

module.exports = router;
